//----------------------------------------------------------------------------
//  ,-.
// /_\___ ,   Ninja Framework
// '  ___\    (C) Riccardo Capra - http://riccar.do
//  //   \\
//----------------------------------------------------------------------------
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------------

#ifndef NJ_DUMMY_SYNC_OBJECT_INLINE_H
#	define NJ_DUMMY_SYNC_OBJECT_INLINE_H

	//----------------------------------------------------------------------------
	inline NjDummySyncObject::NjDummySyncObject()
	{
#	if NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
		DebugInitialize();
#	endif // NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
	}
	//----------------------------------------------------------------------------
	inline NjDummySyncObject::~NjDummySyncObject()
	{
#	if NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
		DebugUninitialize();
#	endif // NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
	}
	//----------------------------------------------------------------------------
	inline void NjDummySyncObject::Lock()
	{
#	if NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
		DebugLock();
#	endif // NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
	}
	//----------------------------------------------------------------------------
	inline NjBool NjDummySyncObject::TryLock(NjUint uTimeMs)
	{
		NJ_UNUSED_VAR(uTimeMs);

#	if NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
		DebugLock();
#	endif // NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED

		return NJ_TRUE;
	}
	//----------------------------------------------------------------------------
	inline void NjDummySyncObject::Unlock()
	{
#	if NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
		DebugUnlock();
#	endif // NJ_DUMMY_SYNC_OBJECT_TRACKING_ENABLED || NJ_DUMMY_SYNC_OBJECT_STORE_LOCKER_ENABLED
	}
	//----------------------------------------------------------------------------

#endif // NJ_DUMMY_SYNC_OBJECT_INLINE_H
